#ifndef DISCOUNTHPP
#define DISCOUNTHPP

class Discount
{
private:
public:
    enum class Trinket { gold, silver, bronze };
    enum class Trinket2 { gold, silver, bronze };
    enum Trinket3 { diamond = 20, platinum = 15, gold = 10, silver = 5, bronze = 2 };

    static float get_discount(Trinket trinket, int price);
    static float get_discount2(Trinket2 trinket, int price);
    static int get_difference(Trinket3 one, Trinket3 another);
    static bool is_cheaper(Trinket3 one, Trinket3 another);
};

float Discount::get_discount(Trinket trinket, int price)
{
    switch(trinket)
    {
        case Trinket::bronze:
            if(price >= 50 && price < 150)
                return 0.02;
            if(price >= 150)
                return 0.03;
            break;
        case Trinket::silver:
            if(price >= 50 && price < 150)
                return 0.03;
            if(price >= 150)
                return 0.04;
            break;
        case Trinket::gold:
            if(price >= 40 && price < 140)
                return 0.04;
            if(price >= 140)
                return 0.05;
        break;
    }
    return 0;
}

float Discount::get_discount2(Trinket2 trinket, int price)
{
    switch(trinket)
    {
        case Trinket2::bronze:
            if(price >= 50)
                return 0.02;
            break;
        case Trinket2::silver:
            if(price >= 50)
                return 0.04;
            break;
        case Trinket2::gold:
            if(price >= 50)
                return 0.05;
        break;
    }
    return 0;
}

int Discount::get_difference(Trinket3 one, Trinket3 another)
{
    return one - another;
}

bool Discount::is_cheaper(Trinket3 one, Trinket3 another)
{
    int difference = get_difference(one, another);
    if(difference < 0)
        return true;
    else
        return false;
}

#endif